<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>公告管理</title>

    <div th:include="commons :: comhead"></div>
</head>

<body class="sticky-header">

<section>
    <!-- left side start-->
    <div th:replace="commons :: #left"></div>
    <!-- left side end-->

    <!-- main content start-->
    <div class="main-content" >

        <!-- header section start-->
        <div th:replace="commons :: #search"></div>
        <!-- header section end-->
        <div class="row" style="width: 200%">
            <div class="col-sm-6">
                <section class="panel">
                    <header class="panel-heading no-border">
                        公告详情：
                        <span class="tools pull-right">
                                <a href="javascript:;" class="fa fa-chevron-down"></a>
                                <a href="javascript:;" class="fa fa-times"></a>
                             </span>
                    </header>
                    <div class="panel-body">
                        <table class="table table-bordered" style="width: 80%" >
                            <thead>
                            <tr >
                                <th style="width: 10%;">公告编号</th>
                                <th style="width: 50%;text-align: center ;">公告内容</th>
                                <th style="width: 10%;">发布者</th>
                                <th style="width: 15%;">发布时间</th>
                                <span th:if="${1==session.user.id}"><th style="width: 10%;">操作</th></span>

                            </tr>
                            </thead>

                            <tbody th:each="p,sta:${n}">
                            <tr>
                                <td th:text="${sta.count}"></td>
                                <td th:text="${p.nmark}"></td>
                                <td th:text="${p.ename}"></td>
                                <td th:text="${#dates.format(p.edate,'yyyy-MM-dd HH:mm:ss')}"></td>
                                <!--这里判断用户有无删除公告的权限，默认只有公告的发布者才能删除，其他人登录进来看不到“删除本公告”的超链接-->
                                <span th:if="${1==session.user.id}"><td><button class="btn btn-success"  type="button"><a style="color: deeppink" th:href="'boss_delete_notice?nid='+${p.nid}">删除本公告</a></button></td></span>

                            </tr>


                            </tbody>
                            </table>
                    </div>
                </section>
            </div>

        </div>
        <!-- page heading start-->

        <!-- page heading end-->

        <!--footer section start-->
        <footer>
            2020 &copy; AdminEx by ThemeBucket </a>
        </footer>
        <!--footer section end-->


    </div>
    <!-- main content end-->
</section>

<!-- Placed js at the end of the document so the pages load faster -->
<div th:replace="commons :: js"></div>

<!--common scripts for all pages-->

</body>
</html>
